Skip to content

CSTACKEX-301: automation for cs volume resize - #109

Open
sathvikaragi wants to merge 2 commits into
mainfrom
automation/CSTACKEX-301
Open

sathvikaragi wants to merge 2 commits into
mainfrom
automation/CSTACKEX-301

Conversation

@sathvikaragi

@sathvikaragi sathvikaragi commented Sep 24, 2026 •

Copy link
Copy Markdown
Collaborator

Description

automation test cases for volume resize.

Test cases covered:

-Verify resize is rejected while the VM is running.
-Stop the VM and grow the attached volume.
-Verify the resized size through:
CloudStack database
NFS3: host-side qemu-img info
iSCSI: ONTAP LUN space.size
-Verify shrinking is rejected and existing sizes remain unchanged.
-Restart the VM and validate the resized disk capacity.
-Detach volume and grow the volume again.

This PR...

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

Screenshot 2026-09-28 at 11 40 21 AM Screenshot 2026-09-28 at 11 40 37 AM

How did you try to break this feature and the system with this change?

@github-actions

Copy link
Copy Markdown

🔴 Test Coverage Grade: D — Marginal

Metric Value
Line coverage 24.75%
Branch coverage 18.87%

Grade Scale

Grade Line Coverage Meaning
🟢 A ≥ 80% Excellent - this code sleeps well at night 😴
🟡 B 60-79% Good - almost there, don't stop now 😉
🟠 C 40-59% Acceptable - your code is wearing a seatbelt, but no airbags 😬
🔴 D 20-39% Marginal - boldly shipping where no test has gone before 🖖
⛔ F < 20% Failing - tests? what tests? 🔥

Branch coverage is shown as a secondary signal. Grade is determined by line coverage.
View full Actions run

# ------------------------------------------------------------------

@attr(tags=["iscsi_vm_workflow"], required_hardware=True)
def test_05_resize_running_vm_rejected(self):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you have to merge this code once resize code is merged to main. Else it will start breaking.

lets add dependency for the PR aligning to CSTACKEX-261

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's true without that Pr getting merged this shouldn't be merged.

with self.assertRaises(Exception) as context:
self._resize_volume(
self.__class__.volume.id, initial_gib, shrink_ok=True)
self.assertIn(

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it inline to the validation added for lesser size than current?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes currently when ISCSI volume is tried to shrink I throw this :

"Failed to resize volume operation of volume UUID: [6fad65cd-4f12-402f-a5d9-58e32308c350] due to - Storage pool OntapISCSIVM_79982 does not support shrinking a volume."

hence I added the assertion to check for doesn't support shrinking.

Comment thread test/integration/plugins/ontap/iscsi/instance/test_vm_volume_attach.py Outdated
@github-actions

Copy link
Copy Markdown

🔴 Test Coverage Grade: D — Marginal

Metric Value
Line coverage 24.74%
Branch coverage 18.87%

Grade Scale

Grade Line Coverage Meaning
🟢 A ≥ 80% Excellent - this code sleeps well at night 😴
🟡 B 60-79% Good - almost there, don't stop now 😉
🟠 C 40-59% Acceptable - your code is wearing a seatbelt, but no airbags 😬
🔴 D 20-39% Marginal - boldly shipping where no test has gone before 🖖
⛔ F < 20% Failing - tests? what tests? 🔥

Branch coverage is shown as a secondary signal. Grade is determined by line coverage.
View full Actions run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants